package com.junjie.food.orderServiceManager.service;


import com.junjie.food.orderServiceManager.dto.OrderMessageDTO;
import org.springframework.amqp.core.Message;
import org.springframework.messaging.handler.annotation.Payload;

import java.io.IOException;
import java.util.concurrent.TimeoutException;

public interface OrderMessageService{
    // 声明消费者消息处理逻辑
    void handleMessage(byte[] message) throws IOException, TimeoutException, InterruptedException;

    // 测试自定义转换器，原本是byte[]数组，现在直接自定义转换器将消息转换成OrderMessageDTO
    void handleMessage(OrderMessageDTO message) throws IOException, TimeoutException, InterruptedException;

    // 使用RabbitListener
    void handleMessage(@Payload Message message) throws IOException, TimeoutException, InterruptedException;
}
